using System;
using System.Globalization;
using System.Windows;
using System.Windows.Data;

namespace Tycho.Peyote.Mock {
    class BooleanToGridLengthConverter : IValueConverter {
        public GridLength Length { get; set; }

        public object Convert (object value, Type targetType, object parameter, CultureInfo culture) {
            if ((bool) value) {
                return Length;
            } else {
                return new GridLength(0);
            }
        }

        public object ConvertBack (object value, Type targetType, object parameter, CultureInfo culture) {
            throw new System.NotImplementedException ();
        }
    }
}